<?php

class ViewUserAllWidget extends CWidget {

    public function init() {
    	$criteria = new CDbCriteria;
    	$criteria->order = "id desc";
    	$criteria->limit =1;
    	$criteria->condition="user_id=".Yii::app()->user->id;
    	$data = Job::model()->find($criteria);
    	if ($data->bidjobs != null) {
    		$this->render('view_user_all',array('data'=>$data));
    	}
    }

}

?>
